<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let arr1 = [4, 5, 8, 11, 8, 3, 78]
    let arr2 = [7, 8, 61, 7, 566]
    let arrTo = arr1.concat(arr2)
    console.log(arrTo);
    console.log('合并后:' + arrTo)
    console.log('排序前：' + arrTo)
    for (var i = 0; i < arrTo.length; i++) {
      for (var j = 0; j < arrTo.length; j++) {
        if (arrTo[j] > arrTo[j + 1]) {
          [arrTo[j], arrTo[j + 1]] = [arrTo[j + 1], arrTo[j]]
        }
      }
    }
    console.log('排序后：' + arrTo)
  </script>
</body>

</html>